#include <stdio.h>
#include <unistd.h>
#include "ohos_init.h"
#include "los_tick.h"

VOID Example_GetTime(VOID)
{
    UINT32 cyclePerTick;
    UINT64 tickCount;

    cyclePerTick = LOS_CyclePerTickGet();
    if (0 != cyclePerTick)
    {
        dprintf("LOS_CyclePerTickGet = %d \n", cyclePerTick);
    }

    tickCount = LOS_TickCountGet();
    if (0 != tickCount)
    {
        dprintf("LOS_TickCountGet = %d \n", (UINT32)tickCount);
    }

    LOS_TaskDelay(200);
    tickCount = LOS_TickCountGet();
    if (0 != tickCount)
    {
        dprintf("LOS_TickCountGet after delay = %d \n", (UINT32)tickCount);
    }
}

APP_FEATURE_INIT(Example_GetTime);